<?php
session_write_close();

$rootdir = dirname(dirname(__FILE__));
require_once ($rootdir . "/config.inc.php");

// logging
require_once $rootdir . '/includes/Log.php';
$logger = & Log :: singleton('file', $rootdir . '/logs/log', 'Rijlesplanner.nl');

/**
$logger = & Log :: singleton('firebug', '', 'Rijlesplanner.nl', array (
	'buffering' => true,
	'timeFormat' => '%b %d %H:%M:%S'
), PEAR_LOG_DEBUG);
*/

require_once ($rootdir."/includes/classes.inc.php");
session_start(); // session start must come after class definition, see why at http://nl3.php.net/manual/en/language.oop5.magic.php#66140

// configuration
$_SESSION['config'] = $config;

require_once ($rootdir."/includes/errors.inc.php");
$_SESSION['application_errors'] = $application_errors;

// useful functions
require_once ($rootdir. "/includes/check_email.inc.php");
require_once ($rootdir. "/includes/functions.inc.php");

// Smarty templating
require_once ($rootdir. "/includes/templates.inc.php");

// the site modules
include ($config['module_dir'] . "/modules.php");
?>
